package com.woniu.product;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class TopicProduct {

    @Autowired
    private RabbitTemplate rabbitTemplate;

    public void send(String msg,String routeKey){
        rabbitTemplate.convertAndSend("topicExchange",routeKey,msg);
    }
}
